public static enPlatform getCurrentPlatform() { enPlatform Platform = enPlatform.Unknown; if (Type.GetType("Mono.Runtime") != null) { Platform = enPlatform.Mono; #if __IOS__ Platform = enPlatform.iOS; #endif #if __TVOS__ Platform = enPlatform.tvOS; #endif #if __WATCHOS__ Platform = enPlatform.watchOS; #endif #if __ANDROID__ Platform = enPlatform.Android; #endif } else { Platform = enPlatform.Windows; #if WINDOWS_PHONE_APP Platform = enPlatform.WindowsPhone; #endif #if WINDOWS_APP Platform = enPlatform.WindowsUniversal; #endif } return(Platform); }
void OpenForm() { enPlatform platform = (enPlatform)Enum.Parse(typeof(enPlatform), cbbPlatform.SelectedItem.ToString()); mPlatformWindowMaping[(int)platform].ShowDialog(this); }
public WindowPlatform(enPlatform _platform) { InitializeComponent(); platform = _platform; InitializeConfig(); }