using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AlgeAPI
{
public partial class Main : Form
{
public static ListView Items = new ListView();
public Main()
{
InitializeComponent();
}
private void Connect(object sender, EventArgs e)
{
}
private void Export(object sender, EventArgs e)
{
using (SaveFileDialog std = new SaveFileDialog() { Filter = "Text Documents | *.txt", ValidateNames = true })
{
if (std.ShowDialog() == DialogResult.OK)
{
using (TextWriter tw = new StreamWriter(new FileStream(std.FileName, FileMode.Create), Encoding.UTF)
{
foreach (ListViewItem items in Items.Items)
{
tw.WriteLine(items.Text);
for (int i = 1; i <= 3; i++)
{
string format = i++ + "/t";
tw.WriteLine(items.SubItems[format].ToString());
}
}
}
}
}
}
public static string Hex2String(byte[] values)
{
return BitConverter.ToString(values);
}
private void DisplayValues(object sender, EventArgs e)
{
try
{
Byte[] value1 = { Byte.MinValue};
for (; value1[0] < Byte.MaxValue; value1[0]++)
{
string inputVal = "0x";
string input = Hex2String(value1);
listView1.Items.Add(inputVal + input);
if(value1[0] == Byte.MaxValue)
{
break;
}
}
}
catch(Exception ex)
{
MessageBox.Show( "Error continious loop original Error : " + ex, "Error Exception thrown");
}
}
}
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.