コード例 #1
0
        public DialogNotifier( NotifierDialogData data )
        {
            InitializeComponent();

            DialogData = data.Clone();

            Text = DialogData.Title;
            Font = Utility.Configuration.Config.UI.MainFont;
            Icon = Resource.ResourceManager.Instance.AppIcon;
            Padding = new Padding( 4 );

            //SetStyle( ControlStyles.UserPaint, true );
            //SetStyle( ControlStyles.SupportsTransparentBackColor, true );
            ForeColor = DialogData.ForeColor;
            BackColor = DialogData.BackColor;

            if ( DialogData.DrawsImage && DialogData.Image != null ) {
                ClientSize = DialogData.Image.Size;
            }

            if ( !DialogData.HasFormBorder )
                FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

            var o = ElectronicObserver.Observer.APIObserver.Instance;
            o.APIList["api_port/port"].ResponseReceived += CloseOnPort;
            data.CloseAll += data_CloseAll;
        }
コード例 #2
0
        public NotifierBase( Utility.Configuration.ConfigurationData.ConfigNotifierBase config )
        {
            Initialize();
            DialogData = new NotifierDialogData( config );
            if ( config.PlaysSound && config.SoundPath != null && config.SoundPath != "" )
                LoadSound( config.SoundPath );

            IsEnabled = config.IsEnabled;
            PlaysSound = config.PlaysSound;
            ShowsDialog = config.ShowsDialog;
            AccelInterval = config.AccelInterval;
        }
コード例 #3
0
        public NotifierBase(Utility.Configuration.ConfigurationData.ConfigNotifierBase config)
        {
            Initialize();
            DialogData = new NotifierDialogData(config);
            if (config.PlaysSound && config.SoundPath != null && config.SoundPath != "")
            {
                LoadSound(config.SoundPath);
            }

            IsEnabled     = config.IsEnabled;
            PlaysSound    = config.PlaysSound;
            ShowsDialog   = config.ShowsDialog;
            AccelInterval = config.AccelInterval;
        }
コード例 #4
0
        public NotifierBase(Utility.Configuration.ConfigurationData.ConfigNotifierBase config)
        {
            Initialize();
            DialogData = new NotifierDialogData(config);
            if (config.PlaysSound && !string.IsNullOrEmpty(config.SoundPath))
            {
                LoadSound(config.SoundPath);
            }

            IsEnabled     = config.IsEnabled;
            IsSilenced    = config.IsSilenced;
            PlaysSound    = config.PlaysSound;
            SoundVolume   = config.SoundVolume;
            LoopsSound    = config.LoopsSound;
            ShowsDialog   = config.ShowsDialog;
            AccelInterval = config.AccelInterval;
        }
コード例 #5
0
        public DialogNotifier( NotifierDialogData data )
        {
            InitializeComponent();

            DialogData = data.Clone();

            Text = DialogData.Title;
            Font = Utility.Configuration.Config.UI.MainFont;
            Icon = Resource.ResourceManager.Instance.AppIcon;
            Padding = new Padding( 4 );

            //SetStyle( ControlStyles.UserPaint, true );
            //SetStyle( ControlStyles.SupportsTransparentBackColor, true );
            ForeColor = DialogData.ForeColor;
            BackColor = DialogData.BackColor;

            if ( DialogData.DrawsImage && DialogData.Image != null ) {
                ClientSize = DialogData.Image.Size;
            }

            if ( !DialogData.HasFormBorder )
                FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
        }
コード例 #6
0
 public NotifierBase()
 {
     Initialize();
     DialogData = new NotifierDialogData();
 }
コード例 #7
0
 public NotifierBase()
 {
     Initialize();
     DialogData = new NotifierDialogData();
 }