コード例 #1
0
        private void BtnNew_Click(object sender, RoutedEventArgs e)
        {
            ProxyChannelItem    pi           = new ProxyChannelItem();
            AddOrEditChannelWnd addOrEditWnd = new AddOrEditChannelWnd(pi, false);

            if (addOrEditWnd.ShowDialog().Value)
            {
                _channelVMList.Add(pi);
                SaveConfig();
            }
        }
コード例 #2
0
        private void BtnEdit_Click(object sender, RoutedEventArgs e)
        {
            ProxyChannelItem selItem = dgChannel.SelectedItem as ProxyChannelItem;

            if (selItem == null)
            {
                LocalMsgBox("Please select the channel that you want to edit.");
                return;
            }
            if (selItem.IsRunning)
            {
                LocalMsgBox("Can not edit channel during running time.");
                return;
            }
            AddOrEditChannelWnd addOrEditWnd = new AddOrEditChannelWnd(selItem, false);

            if (addOrEditWnd.ShowDialog().Value)
            {
                SaveConfig();
            }
        }