Esempio n. 1
0
        private void rbtn_Toggled(object sender, EventArgs e)
        {
            RadioButton rbtn = (RadioButton)sender;

            if (!rbtn.Active)
            {
                return;
            }

            algImage.DestroyChild();

            PurposeBase purpose = rbtn.Data ["PurposeBase"] as PurposeBase;

            if (purpose == null)
            {
                return;
            }

            Image img = purpose.Image;

            if (img == null)
            {
                return;
            }

            img.Show();
            algImage.Add(img);
        }
Esempio n. 2
0
        private void RefreshStatus()
        {
            algStatus.DestroyChild();

            Image image = GetStatusImage(step.Status);

            if (image == null)
            {
                return;
            }

            image.Show();
            algStatus.Add(image);
        }
        private void grid_SelectionChanged(object sender, EventArgs args)
        {
            IDataExchanger exchanger = (IDataExchanger)grid.Model [grid.Selection [0]];
            bool           usesFile  = exchanger.UsesFile;

            algExchangeFile.Visible = usesFile;

            if (usesFile)
            {
                if (string.IsNullOrWhiteSpace(txtExchangeFile.Text) && !string.IsNullOrEmpty(defaultFileName))
                {
                    SetExchangeFileName(Path.Combine(GetInitialFolder(), defaultFileName + exchanger.DefaultFileExtension));
                }
                else if (!string.IsNullOrWhiteSpace(txtExchangeFile.Text) && !string.IsNullOrEmpty(defaultFileName))
                {
                    string folder = Path.GetDirectoryName(txtExchangeFile.Text);
                    string file   = Path.GetFileNameWithoutExtension(txtExchangeFile.Text);
                    SetExchangeFileName(Path.Combine(folder ?? string.Empty, file + exchanger.DefaultFileExtension));
                }
                if (chkExchangeFile.Active)
                {
                    chkOpenFile.Sensitive = true;
                }
                chkOpenFile.Active = BusinessDomain.AppConfiguration.OpenExportedFile;
            }
            else
            {
                chkOpenFile.Active = chkOpenFile.Sensitive = false;
            }

            algCustomWidget.DestroyChild();

            Widget customWidget = exchanger.GetCustomWidget(data) as Widget;

            if (customWidget != null)
            {
                algCustomWidget.Add(customWidget);
            }
        }
Esempio n. 4
0
 public void SetImage(Image img)
 {
     algIcon.DestroyChild();
     img.Show();
     algIcon.Add(img);
 }