示例#1
0
        void V_Data_E_ContextMenuClicked(object sender, FormAdders.EasyGridViewCollections.EasyGridMenuClickArgs args)
        {
            switch (args.Text)
            {
            case "SetAsStartPoint":
                if (SetAsStartPoint(args.RowIndex) == false)
                {
                    MessageBox.Show("비활성된 라인입니다. 체크를 풀어주세요.");
                }
                break;

            case "Copy This":
            {
                String        name   = V_Data.GetValue(args.RowIndex, (int)Titles.name) as String;
                String        msg    = V_Data.RowRelativeObject(args.RowIndex)["msg"] as String;
                CPacketStruct parser = V_Data.Rows[args.RowIndex].RelativeObject["parser"] as CPacketStruct;
                AddNewItem(parser, name);
                //initList();
            }
            break;

            case "Delete Lines":
                if (V_Data.SelectedRows.Count > 0)
                {
                    List <EasyGridRow> rows = new List <EasyGridRow>(V_Data.SelectedRows);
                    foreach (EasyGridRow row in rows)
                    {
                        DeleteLine(row.Index);
                    }
                    foreach (EasyGridRow row in rows)
                    {
                        V_Data.RemoveARow(row, false);
                    }
                    V_Data.RefreshList();
                    saveNameList();
                }
                break;

            case "Make New Msg":
            {
                InputForm    input  = new InputForm();
                DialogResult result = input.ShowDialog("새 메시지 이름");
                if (result == DialogResult.Cancel || result == DialogResult.Abort)
                {
                    return;
                }
                AddNewItem(null, input.InputText);
            }
            break;
            }
        }
示例#2
0
        void V_Data_E_ContextMenuClicked(object sender, FormAdders.EasyGridViewCollections.EasyGridMenuClickArgs args)
        {
            switch (args.Text)
            {
            case "SetAsStartPoint":
                if (SetAsStartPoint(args.RowIndex) == false)
                {
                    MessageBox.Show("비활성된 라인입니다. 체크를 풀어주세요.");
                }
                break;

            case "Copy This":
                String name = V_Data.GetValue(args.RowIndex, (int)Titles.name) as String;
                String msg  = V_Data.RowRelativeObject(args.RowIndex)["msg"] as String;
                AddNewItem(msg, name, true);
                //initList();
                break;

            case "Delete Lines":
                if (V_Data.SelectedRows.Count > 0)
                {
                    List <EasyGridRow> rows = new List <EasyGridRow>(V_Data.SelectedRows);
                    foreach (EasyGridRow row in rows)
                    {
                        DeleteLine(row.Index);
                    }
                    foreach (EasyGridRow row in rows)
                    {
                        V_Data.RemoveARow(row, false);
                    }
                    V_Data.RefreshList();
                    saveNameList();
                }
                break;
            }
        }