Пример #1
0
    protected override void innerLaunch()
    {
      LookFeel.SetupNoirModerneLookFeel();

      var sf = new ShowForm
      {
        Text = "SI.RollMonitor"
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);
    }
Пример #2
0
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      AppDomain.CurrentDomain.UnhandledException += handleUnhandledException;

      LookFeel.SetupNoirModerneLookFeel();

      Logger.SetLog4NetGlobalContextProperty("LogFileDir", string.Format("{0}\\SI.RollMonitor.LN", Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)));
      Logger.Configure();
      Logger.Debug("Logging up and running", typeof(Program));

      if (!SymmetryEnvironment.IsInSymmetryDomain)
      {
        DialogResult result;

        using (var loginForm = new SI.Controls.LoginForm())
          result = loginForm.DisplayInShowFormDialog("RollMonitor Login please", null);

        if (result != DialogResult.OK)
          return;
      }

      ShowForm.DefaultIcon = RollMonitorResources.Designcontest_Vintage_Paint_Roll;

      var sf = new ShowForm
      {
        Text =
          string.Format("SI.RollMonitor - {0}",
            System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()),
      };

      var mc = new MainContainer();

      sf.Create(mc);
      mc.Create();

      Application.Run(sf);

    }