コード例 #1
0
        public MainWindow(Configuration configuration, Program program, StatisticsService statisticsService)
        {
            InitializeComponent();

            Configuration     = configuration;
            Program           = program;
            StatisticsService = statisticsService;

            IsFirstLine = true;

            ShuttingDown = false;

            DataContext = new MainWindowDataContext(configuration);

            Assembly entryAssembly = Assembly.GetEntryAssembly();
            Version  version       = entryAssembly.GetName().Version;

            Title = string.Format("Riot Control r{0}", version.Revision);
            RevisionLabel.Content = string.Format("r{0}", version.Revision);
            TimeLabel.Content     = Nil.Assembly.GetAssemblyBuildTime(entryAssembly).ToString();
            WebsiteLabel.Content  = Website;

            UpdateHelpLabel();

            var iconStream = System.Windows.Application.GetResourceStream(new Uri("pack://application:,,,/Resources/Icon.ico")).Stream;

            TrayIcon                   = new NotifyIcon();
            TrayIcon.Icon              = new Icon(iconStream);
            TrayIcon.MouseDoubleClick += TrayIconDoubleClick;

            iconStream.Close();

            LoadOptions();
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: Tyrix/RiotControl
        public MainWindow(Configuration configuration, Program program, StatisticsService statisticsService)
        {
            InitializeComponent();

            Configuration = configuration;
            Program = program;
            StatisticsService = statisticsService;

            IsFirstLine = true;

            ShuttingDown = false;

            DataContext = new MainWindowDataContext(configuration);

            Assembly entryAssembly = Assembly.GetEntryAssembly();
            Version version = entryAssembly.GetName().Version;

            Title = string.Format("Riot Control r{0}", version.Revision);
            RevisionLabel.Content = string.Format("r{0}", version.Revision);
            TimeLabel.Content = Nil.Assembly.GetAssemblyBuildTime(entryAssembly).ToString();
            WebsiteLabel.Content = Website;

            UpdateHelpLabel();

            var iconStream = System.Windows.Application.GetResourceStream(new Uri("pack://application:,,,/Resources/Icon.ico")).Stream;

            TrayIcon = new NotifyIcon();
            TrayIcon.Icon = new Icon(iconStream);
            TrayIcon.MouseDoubleClick += TrayIconDoubleClick;

            iconStream.Close();

            LoadOptions();
        }
コード例 #3
0
        public MainWindow(Configuration configuration, Program program, StatisticsService statisticsService)
        {
            InitializeComponent();

            Configuration = configuration;
            Program = program;
            StatisticsService = statisticsService;

            IsFirstLine = true;

            DataContext = new MainWindowDataContext(configuration);

            Assembly entryAssembly = Assembly.GetEntryAssembly();

            Version version = entryAssembly.GetName().Version;

            Title = string.Format("Riot Control r{0} ({1})", version.Revision, Nil.Assembly.GetAssemblyBuildTime(entryAssembly));

            UpdateHelpLabel();
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: dimzy/RiotControl
        public MainWindow(Configuration configuration, Program program, StatisticsService statisticsService)
        {
            InitializeComponent();

            Configuration = configuration;
            Program = program;
            StatisticsService = statisticsService;

            IsFirstLine = true;

            ShuttingDown = false;

            DataContext = new MainWindowDataContext(configuration);

            Assembly entryAssembly = Assembly.GetEntryAssembly();
            Version version = entryAssembly.GetName().Version;

            Title = string.Format("Riot Control r{0}", version.Revision);
            RevisionLabel.Content = string.Format("r{0}", version.Revision);
            TimeLabel.Content = Nil.Assembly.GetAssemblyBuildTime(entryAssembly).ToString();
            WebsiteLabel.Content = Website;

            UpdateHelpLabel();
        }