예제 #1
0
파일: Form1.cs 프로젝트: rpparas/FastCode
        private void button26_Click(object sender, EventArgs e)
        {
            ClassInfo ci = ClassFiles.GetClassInfo(tabControl2.SelectedTab.Text);
            NewCondition nc = new NewCondition(ci, FindMethod());
            nc.ShowDialog();

            if (nc.MethodSelected != null && !nc.IsDefault)
            {
                String[] lines = nc.Lines;
                richTextBox1.SelectedText = "\n           ";
                for (int i = 0; i < lines.Length; i++)
                {
                    richTextBox1.SelectedText = lines[i] + "\n           ";
                    richTextBox1.SelectionIndent = 10;
                }

                lines = GetCode();
                String text = "";
                if(lines != null)
                {
                    for (int i = 0; i < lines.Length; i++)
                    {
                        text += lines[i] + @"\line ";
                    }
                }

                text = text.Replace("{",@"\{");
                text = text.Replace("}",@"\}");

                nc.MethodSelected.Code = text;
                ci.EditMethod(nc.MethodSelected);
                ClassFiles.RemoveAll();
                ClassFiles.Add(ci);
            }

            JustAdded = true;
        }
예제 #2
0
파일: Form1.cs 프로젝트: rpparas/FastCode
 private void conditionStatementsIFToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ClassInfo ci = ClassFiles.GetClassInfo(tabControl2.SelectedTab.Text);
     Form popup = new NewCondition(ci, FindMethod());
     popup.ShowDialog();
     JustAdded = true;
 }