Example #1
0
 public MainWindow()
 {
     this.InitializeComponent();
     this.saver               = new WindowSaver(this);
     this.saver.AutoLoad      = false;
     this.saver.AutoSave      = false;
     this.saver.LoadSettings += this.Saver_LoadSettings;
     this.saver.SaveSettings += this.Saver_SaveSettings;
 }
Example #2
0
        public MainWindow()
        {
            this.InitializeComponent();
            this.calc = (Calculator)this.FindResource(nameof(this.calc));

            this.saver = new WindowSaver(this);
            this.saver.LoadSettings += this.Saver_LoadSettings;
            this.saver.SaveSettings += this.Saver_SaveSettings;
        }
Example #3
0
        public MainWindow()
        {
            this.InitializeComponent();

            this.saver = new WindowSaver(this);
            this.saver.LoadSettings += this.Saver_LoadSettings;
            this.saver.SaveSettings += this.Saver_SaveSettings;

            // On .NET Core, we can't create a "RIPEMD-160 (160-bit)" instance for System.Security.Cryptography.RIPEMD160.
            foreach (ComboBoxItem item in this.algorithm.Items.Cast <ComboBoxItem>().ToArray())
            {
                using HashAlgorithm hasher = HashAlgorithm.Create((string)item.Tag);
                if (hasher == null)
                {
                    this.algorithm.Items.Remove(item);
                }
            }
        }
Example #4
0
        public MainWindow()
        {
            this.InitializeComponent();

            this.statusRows   = (StatusRowCollection)this.Resources["StatusRows"];
            this.statusRowMap = new Dictionary <Guid, StatusRow>();

            this.logRows = (LogRowCollection)this.Resources["LogRows"];
            this.failedPeerGroupToLogRowMap = new Dictionary <Guid, LogRow>(this.statusRowMap.Comparer);

            this.windowSaver = new WindowSaver(this)
            {
                AutoLoad = false
            };
            this.windowSaver.LoadSettings += this.WindowSaverLoadSettings;
            this.windowSaver.SaveSettings += this.WindowSaverSaveSettings;

            this.notifyIcon = this.CreateNotifyIcon();
        }