Esempio n. 1
0
        public bool LaunchSessionWithOhmstudio(long sessionid)
        {
            var args    = $"ohmstudio:///session?id={sessionid}";
            var cmdPath = $"{GetProgramFilesx86()}\\Ohm Force\\Ohm Studio\\";
            var cmd     = $"{cmdPath}ohm_studio_client_url_hook.exe";

            if (!File.Exists(cmd))
            {
                AppStateOwner.DisplayErrorDialog($"Could not find the ohmstudio process {cmd}", "Error while launching ohmstudio client.");
                return(false);
            }
            try
            {
                if (!OhmLauncher.CheckIfLaunched(AppStateOwner))
                {
                    return(false);
                }
                var startInfo = new ProcessStartInfo
                {
                    UseShellExecute = false
                    ,
                    FileName = cmd
                    ,
                    Arguments = args
                    ,
                    WindowStyle = ProcessWindowStyle.Hidden
                };

                Logger.Trace($"Attempting to launch ohmstudio with session {sessionid}, invocation: {cmd} {args} ");

                Process.Start(startInfo);
                return(true);
            }

            catch (Exception ex)
            {
                var msg = $"Failed to launch ohm session {sessionid} from path: {cmdPath}. Exception{ex}";
                AppStateOwner.DisplayErrorDialog(msg, $"Error While trying to launch ohmstudio client with session {sessionid}");
                return(false);
            }
        }
Esempio n. 2
0
        private void OnSpecialThanks(object sender, RoutedEventArgs e)
        {
            var msg = "A very special thanks to: irockus, Flavio67, jazzcrime, jamie57lp for their outstanding support!";

            AppStateOwner.DisplayInfoDialog(msg, "Special Thanks!");
        }