Ejemplo n.º 1
0
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            ContentControl path    = (cmbPath.SelectedItem as ContentControl);
            string         pathStr = path != null ? (path.Tag as string) : cmbPath.Text;

            if (radProgram.IsChecked == true)
            {
                ID = ProgramID.NewProgID(pathStr);
            }
            else if (radService.IsChecked == true)
            {
                ServiceModel.Service svc = (cmbService.SelectedItem as ServiceModel.Service);
                ID = ProgramID.NewSvcID(svc != null ? svc.Value : cmbService.Text, pathStr);
            }
            else if (radApp.IsChecked == true)
            {
                AppModel.AppPkg name = (cmbApp.SelectedItem as AppModel.AppPkg);
                ID = ProgramID.NewAppID(name != null ? name.Value : cmbApp.Text, pathStr);
            }
            else
            {
                ID = ProgramID.NewID(ProgramID.Types.Global);
            }

            this.DialogResult = true;
        }
Ejemplo n.º 2
0
        private void cmbApp_DropDownClosed(object sender, EventArgs e)
        {
            if (SuspendChange > 0)
            {
                return;
            }

            AppModel.AppPkg item = (cmbApp.SelectedItem as AppModel.AppPkg);
            if (item == null)
            {
                return;
            }

            /*if (item.Value == null)
             *  ...UpdateAppCache();*/
        }