예제 #1
0
        public YAppReleaseManager(YAppInterface appInterface)
        {
            this._appInterface = appInterface;
            this._appName      = appInterface.GetAppName();
            this._platform     = appInterface.GetPlatform();
            string fullVersionStr = appInterface.GetVersion();


            int pos = fullVersionStr.LastIndexOf('.');

            if (pos < 0)
            {
                throw new ArgumentException("Invalid version string:" + fullVersionStr);
            }
            string svnVersionStr = fullVersionStr.Substring(pos + 1);

            if (svnVersionStr == "PATCH_WITH_BUILD")
            {
                this._versionPrefix = fullVersionStr.Substring(0, pos);
                this._svnVersion    = 1234;
            }
            else
            {
                this._versionPrefix = fullVersionStr.Substring(0, pos);
                this._svnVersion    = Convert.ToInt32(svnVersionStr);
            }
        }
예제 #2
0
 private void showBalloon(string title, string body)
 {
     if (_appInterface.GetPlatform() == "Windows")
     {
         _notifyIcon                    = new NotifyIcon();
         _notifyIcon.Visible            = true;
         _notifyIcon.BalloonTipTitle    = title;
         _notifyIcon.BalloonTipText     = body;
         _notifyIcon.BalloonTipClicked += NotifyIcon_BalloonTipClicked;
         _notifyIcon.Icon               = this._appInterface.getApplicationIcon();
         _notifyIcon.ShowBalloonTip(30000);
     }
     else
     {
         new ShortMessage(title, body, NotifyIcon_BalloonTipClicked).Show();
     }
 }