Esempio n. 1
0
        private void closeButton_Click(object sender, EventArgs e) // close all files and reset option buttons
        {
            foreach (var FButton in dinButtons)
            {
                Controls.Remove(FButton);
            }
            ResultBlock.Clear();
            Button_Open.Enabled   = true;
            saveAsButton.Enabled  = true;
            openBinFile.Enabled   = true;
            recordBinFile.Enabled = true;
            closeButton.Enabled   = false;

            //send all files from \AppData\start to \AppData\end

            /*
             * string StartDir = @"C:\\Users\\Asus\\Desktop\\Универ\\3 Семестр. 2 Курс\\asp.net.C#\\Лабораторные работы. С#\\ЛР1\\WFA .NET Lab1\\WFA .NET Lab1\\AppData\\start";
             * string EndDir = @"C:\\Users\\Asus\\Desktop\\Универ\\3 Семестр. 2 Курс\\asp.net.C#\\Лабораторные работы. С#\\ЛР1\\WFA .NET Lab1\\WFA .NET Lab1\\AppData\\end";
             *
             * foreach(string filename in Directory.EnumerateFiles(StartDir))
             * {
             *  using(FileStream SourceStream = System.IO.File.Open(filename,FileMode.Open))
             *  {
             *      using (FileStream DestinationStream = System.IO.File.Create(EndDir + filename.Substring(filename.LastIndexOf('\\'))))
             *      {
             *          await SourceStream.CopyToAsync(DestinationStream);
             *      }
             *  }
             * }*/
        }
Esempio n. 2
0
        public void BlockByHashTest()
        {
            NodeRpcClient nodeRpcClient = new NodeRpcClient(endpoint);
            ResultBlock   result        = nodeRpcClient.BlockByHash("0x989A3A075B6168A5B0F9B75F69BC71608E65D7A8A632F0D462AD311A646923ED");

            Assert.NotNull(result.Block.Header.ChainId);
        }
Esempio n. 3
0
        public void BlockTest()
        {
            NodeRpcClient nodeRpcClient = new NodeRpcClient(endpoint);
            ResultBlock   result        = nodeRpcClient.Block(10779111);

            Assert.NotNull(result.Block.Header.ChainId);
        }
        private void AddToResultBlock(int num)
        {
            if (ResultBlock.Text == "0")
            {
                ResultBlock.Text = "";
            }

            ResultBlock.Text += num.ToString();

            // TODO: might have to call this for ViewBox instead (this should update font size to fit the viewbox)
            ResultBlock.UpdateLayout();
        }
Esempio n. 5
0
 void clearBinButton_click(object sender, EventArgs e) // clear bin file and remove buttons
 {
     currentFile.name = Employer.BinList;
     File.Delete(Employer.BinList);
     using (BinaryWriter bw = new BinaryWriter(File.Create(Employer.BinList = dataFolder + currentFile.name.Substring(currentFile.name.LastIndexOf('\\')))))
     {
     }
     ResultBlock.Clear();
     Button_Open.Enabled  = true;
     saveAsButton.Enabled = true;
     closeButton.Enabled  = false;
     Controls.Remove(dinButtons[dinButtons.Count() - 1]);
 }
Esempio n. 6
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     ResultBlock.Clear();
     ResultBlock.Text = analyze_file();
 }