本文整理汇总了C#中OperationMode类的典型用法代码示例。如果您正苦于以下问题:C# OperationMode类的具体用法?C# OperationMode怎么用?C# OperationMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OperationMode类属于命名空间,在下文中一共展示了OperationMode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnNavigatedTo
protected override async void OnNavigatedTo( NavigationEventArgs e )
{
base.OnNavigatedTo( e );
this.operationMode = OperationMode.Preview;
this.speaker = new Speaker();
if( GpioDeviceBase.IsAvailable )
{
this.led = new Led( 6 );
this.led.TurnOn();
this.pushButton = new PushButton( 16 );
this.pushButton.Pushed += this.OnPushButtonPushed;
this.pnlButtons.Visibility = Visibility.Collapsed;
}
this.camera = new Camera();
await this.camera.InitializeAsync();
this.previewElement.Source = this.camera.CaptureManager;
await this.camera.CaptureManager.StartPreviewAsync();
}
开发者ID:balassy,项目名称:iot-presentation-evaluator,代码行数:25,代码来源:MainPage.xaml.cs
示例2: FaceTracker
/// <summary>
/// Initializes a new instance of the FaceTracker class from a reference of the Kinect device.
/// <param name="sensor">Reference to kinect sensor instance</param>
/// </summary>
public FaceTracker(KinectSensor sensor)
{
if (sensor == null) {
throw new ArgumentNullException("sensor");
}
if (!sensor.ColorStream.IsEnabled) {
throw new InvalidOperationException("Color stream is not enabled yet.");
}
if (!sensor.DepthStream.IsEnabled) {
throw new InvalidOperationException("Depth stream is not enabled yet.");
}
this.operationMode = OperationMode.Kinect;
this.coordinateMapper = sensor.CoordinateMapper;
this.initializationColorImageFormat = sensor.ColorStream.Format;
this.initializationDepthImageFormat = sensor.DepthStream.Format;
var newColorCameraConfig = new CameraConfig(
(uint)sensor.ColorStream.FrameWidth,
(uint)sensor.ColorStream.FrameHeight,
sensor.ColorStream.NominalFocalLengthInPixels,
FaceTrackingImageFormat.FTIMAGEFORMAT_UINT8_B8G8R8X8);
var newDepthCameraConfig = new CameraConfig(
(uint)sensor.DepthStream.FrameWidth,
(uint)sensor.DepthStream.FrameHeight,
sensor.DepthStream.NominalFocalLengthInPixels,
FaceTrackingImageFormat.FTIMAGEFORMAT_UINT16_D13P3);
this.Initialize(newColorCameraConfig, newDepthCameraConfig, IntPtr.Zero, IntPtr.Zero, this.DepthToColorCallback);
}
开发者ID:ushadow,项目名称:handinput,代码行数:35,代码来源:FaceTracker.cs
示例3: Insert
/// <summary>
/// 插入一个节点
/// </summary>
/// <param name="locationType">这里locationType.LocationDepth表示想要插入的位置</param>
/// <param name="mode">插入的方式,有初始化、前插、后插三种</param>
/// <returns></returns>
public static bool Insert(Locationtype locationType, OperationMode mode)
{
try
{
ISQLExecutor executor = ConfigurationHelper.Instance.CreateNewSQLExecutor() as ISQLExecutor;
bool isPosExist = executor.Exist(typeof(Locationtype), "[email protected]", new List<object>() { locationType.LocationDepth });
if (executor == null)
{
return false;
}
int effectrow = 0;
switch(mode)
{
case OperationMode.Initial:
if (isPosExist)
{
return false;
}
// 初始化,深度肯定为0
locationType.LocationDepth = 0;
effectrow = executor.Insert(typeof(Locationtype), new List<object>() { locationType });
break;
case OperationMode.InsertAfter:
if (!isPosExist)
{
return false;
}
executor.ExecuteNonQuery(ConfigurationHelper.Instance.SqlDictionary["ResetAllBeforeInsert"],
new List<object>() { locationType.LocationDepth });
locationType.LocationDepth += 1;
effectrow = executor.Insert(typeof(Locationtype), new List<object>() { locationType });
break;
case OperationMode.InsertBefore:
if (!isPosExist)
{
return false;
}
executor.ExecuteNonQuery(ConfigurationHelper.Instance.SqlDictionary["ResetAllBeforeInsert"],
new List<object>() { locationType.LocationDepth - 1 });
effectrow = executor.Insert(typeof(Locationtype), new List<object>() { locationType });
break;
default:
break;
}
if (effectrow > 0)
{
return true;
}
}
catch
{
return false;
}
return false;
}
开发者ID:riber,项目名称:parahome,代码行数:62,代码来源:LocationTypeBLL.cs
示例4: WorldSector
public WorldSector(int index_x, int index_y, int lower_boundary_x, int upper_boundary_x, int lower_boundary_y, int upper_boundary_y)
{
this.index_x = index_x;
this.index_y = index_y;
this.lower_boundary_x = lower_boundary_x;
this.upper_boundary_x = upper_boundary_x;
this.lower_boundary_y = lower_boundary_y;
this.upper_boundary_y = upper_boundary_y;
mode = OperationMode.OUT_OF_CHARACTER_RANGE;
Contained_Objects = new GObject_Sector_RefList (new Vector2(index_x, index_y));
}
开发者ID:dav793,项目名称:2D-Survival,代码行数:11,代码来源:WorldSector.cs
示例5: VisitStringInclusionMethod
private Expression VisitStringInclusionMethod(MethodCallExpression node, OperationMode operationMode)
{
OperationMode oldState = _operationMode;
_operationMode = operationMode;
this.Visit(node.Object);
this.CurrentOperation.Append("(");
this.Visit(node.Arguments[0]);
this.CurrentOperation.Append(")");
_operationMode = oldState;
return node;
}
开发者ID:RamanBut-Husaim,项目名称:.NET-Practice,代码行数:12,代码来源:ExpressionToFTSRequestTranslator.cs
示例6: PerformOperationOnList
public void PerformOperationOnList(OperationMode mode)
{
int position;
bool isFound;
switch (mode)
{
case OperationMode.Input:
InputList();
break;
case OperationMode.Insert:
Insert();
break;
case OperationMode.Search:
Console.Write("Please enter an item to search: ");
int itemToSearch = int.Parse(Console.ReadLine());
isFound = Search(itemToSearch, out position);
if (isFound)
{
Console.WriteLine("Item found at {0} position", position);
}
else
{
Console.WriteLine("Item can not be found");
}
break;
case OperationMode.Delete:
Delete();
break;
case OperationMode.Display:
Display();
break;
case OperationMode.Quit:
break;
default:
Console.WriteLine("Please enter a valid option");
break;
}
}
开发者ID:Arnab-Developer,项目名称:List-Using-Array,代码行数:47,代码来源:List.cs
示例7: SelectedOnGUI
public override void SelectedOnGUI() {
mode = OperationMode.Normal;
if(AllowToolUtility.ControlIsHeld) mode = OperationMode.Constrained;
if(AllowToolUtility.AltIsHeld) mode = OperationMode.AllOfDef;
addToSelection = AllowToolUtility.ShiftIsHeld;
if (mode == OperationMode.Constrained) {
if (constraintsNeedReindexing) UpdateSelectionConstraints();
var label = "MassSelect_nowSelecting".Translate(cachedConstraintReadout);
DrawMouseAttachedLabel(label);
} else if (mode == OperationMode.AllOfDef) {
if (Event.current.type == EventType.Repaint) {
var target = TryGetItemOrPawnUnderCursor();
string label = target == null ? "MassSelect_needTarget".Translate() : "MassSelect_targetHover".Translate(target.def.label.CapitalizeFirst());
DrawMouseAttachedLabel(label);
}
}
}
开发者ID:UnlimitedHugs,项目名称:RimworldAllowTool,代码行数:17,代码来源:Designator_MassSelect.cs
示例8: readXml
protected void readXml(string fileName) {
StreamReader sr = new StreamReader(fileName);
XmlDocument doc = new XmlDocument();
doc.LoadXml(sr.ReadToEnd());
sr.Close();
XmlNode node = null;
foreach (XmlNode n in doc.ChildNodes) {
if (n.Name == "instances") {
_dataSetName = n.Attributes[0].Value;
_dataSourceName = n.Attributes[1].Value;
if (n.Attributes[2].Value == "text")
_media = MediaType.Text;
else if (n.Attributes[2].Value == "image")
_media = MediaType.Image;
else if (n.Attributes[2].Value == "video")
_media = MediaType.Video;
else if (n.Attributes[2].Value == "audio")
_media = MediaType.Audio;
if (n.Attributes[3].Value == "learn")
_opMode = OperationMode.Learn;
else if (n.Attributes[3].Value == "validate")
_opMode = OperationMode.Validate;
else if (n.Attributes[3].Value == "classify")
_opMode = OperationMode.Classify;
if (n.Attributes[4].Value == "batch")
_procMode = ProcessMode.Batch;
else if (n.Attributes[4].Value == "online")
_procMode = ProcessMode.Batch;
node = n;
break;
}
}
//parse the IOs
foreach (XmlNode n in node.ChildNodes) {
if (n.Name == "input") {
_sc.InputConditioners.Add(new ScaleAndOffset(
double.Parse(n.Attributes[1].Value),
double.Parse(n.Attributes[2].Value)));
} else if (n.Name == "output") {
_sc.OutputConditioners.Add(new ScaleAndOffset(
double.Parse(n.Attributes[1].Value),
double.Parse(n.Attributes[2].Value)));
}
}
}
开发者ID:dfilarowski,项目名称:artificial-neural-network,代码行数:45,代码来源:NeuralNetworkDataAdapter.cs
示例9: Encrypt
/// <summary>
/// Encrypts bytes with the specified key and IV.
/// </summary>
public static Byte[] Encrypt(Byte[] key, Byte[] bytes, OperationMode mode, Byte[] iv)
{
Check(key, bytes);
RijndaelManaged aes = new RijndaelManaged();
if (iv != null) aes.IV = iv;
aes.Mode = (CipherMode)mode;
aes.Padding = PaddingMode.None;
if (key.Length == 24) aes.KeySize = 192;
else if (key.Length == 32) aes.KeySize = 256;
else aes.KeySize = 128; // Defaults to 128
aes.BlockSize = 128; aes.Key = key;
ICryptoTransform ict = aes.CreateEncryptor();
MemoryStream mStream = new MemoryStream();
CryptoStream cStream = new CryptoStream(mStream, ict, CryptoStreamMode.Write);
cStream.Write(bytes, 0, bytes.Length);
cStream.FlushFinalBlock();
mStream.Close(); cStream.Close();
return mStream.ToArray();
}
开发者ID:TunnelBlanket,项目名称:ASCrypt,代码行数:22,代码来源:AES.cs
示例10: GetLock
public static bool GetLock(Object obj, OperationMode operationMode = OperationMode.Normal)
{
bool shouldGetLock = true;
if (onHierarchyAllowGetLock != null) shouldGetLock = onHierarchyAllowGetLock(obj);
if (shouldGetLock)
{
bool success = GetLock(obj.GetAssetPath(), operationMode);
if (success && onHierarchyGetLock != null) onHierarchyGetLock(obj);
return success;
}
return false;
}
开发者ID:kjems,项目名称:uversioncontrol,代码行数:12,代码来源:VCUtility.cs
示例11: CreateMonitor
/// <summary>
/// Create new monitor for requests depending on the operation mode
/// </summary>
/// <param name="requests">
/// The requests.
/// </param>
/// <param name="operationMode">
/// The operation Mode.
/// </param>
/// <returns>
/// The <see cref="FareRequestMonitor"/>.
/// </returns>
internal FareRequestMonitor CreateMonitor(List<FareMonitorRequest> requests, OperationMode operationMode)
{
if (requests == null || requests.Count < 1)
{
return null;
}
FareRequestMonitor newMon = null;
FareMonitorEvents monitorEvents = null;
if (operationMode == OperationMode.LiveMonitor)
{
newMon = new LiveFareMonitor(this._liveFareStorage, new TaskbarFlightNotifier(), WebFareBrowserControlFactory.Instance);
monitorEvents = this.Events[OperationMode.LiveMonitor];
}
else
{
if (operationMode == OperationMode.ShowFare)
{
newMon = new FareRequestMonitor(WebFareBrowserControlFactory.Instance);
monitorEvents = this.Events[OperationMode.ShowFare];
}
else if (operationMode == OperationMode.GetFareAndSave)
{
newMon = new FareExportMonitor(
AppContext.MonitorEnvironment.ArchiveManager,
WebFareBrowserControlFactory.Instance,
this.View.AutoSync);
monitorEvents = this.Events[OperationMode.GetFareAndSave];
}
else
{
throw new ApplicationException("Unsupported opearation mode: " + operationMode);
}
}
monitorEvents.Attach(newMon);
newMon.Enqueue(requests);
return newMon;
}
开发者ID:tu-tran,项目名称:FareLiz,代码行数:52,代码来源:CheckFareController.cs
示例12: Monitor
/// <summary>
/// Start new fare scan and return the monitor responsible for the new requests
/// </summary>
/// <param name="mode">
/// The mode.
/// </param>
/// <returns>
/// The <see cref="FareRequestMonitor"/>.
/// </returns>
internal FareRequestMonitor Monitor(OperationMode mode)
{
FareRequestMonitor newMon = null;
try
{
// Validate the location of the journey
if (this.View.Departure.Equals(this.View.Destination))
{
this.View.Show(
"Departure location and destination cannot be the same:" + Environment.NewLine + this.View.Departure,
"Invalid Route",
MessageBoxIcon.Exclamation);
return null;
}
// Get list of new requests for the monitor
var newRequests = this.GetRequests();
if (newRequests.Count > 0)
{
newMon = this.CreateMonitor(newRequests, mode);
if (mode != OperationMode.LiveMonitor)
{
this._monitors.Clear(newMon.GetType());
}
AppContext.Logger.InfoFormat("{0}: Starting monitor for {1} new requests", this.GetType().Name, newRequests.Count);
this._monitors.Start(newMon);
}
else
{
string period = this.View.MinDuration == this.View.MaxDuration
? this.View.MinDuration.ToString(CultureInfo.InvariantCulture)
: this.View.MinDuration.ToString(CultureInfo.InvariantCulture) + " and "
+ this.View.MaxDuration.ToString(CultureInfo.InvariantCulture);
string message =
string.Format(
@"There is no travel date which satisfies the filter condition for the stay duration between {0} days (You selected travel period {1})!
Double-check the filter conditions and make sure that not all travel dates are in the past",
period,
StringUtil.GetPeriodString(this.View.DepartureDate, this.View.ReturnDate));
AppContext.Logger.Debug(message);
AppContext.ProgressCallback.Inform(null, message, "Invalid parameters", NotificationType.Exclamation);
}
}
catch (Exception ex)
{
AppContext.ProgressCallback.Inform(this.View, "Failed to start monitors: " + ex.Message, "Check Fares", NotificationType.Error);
AppContext.Logger.Error("Failed to start monitors: " + ex);
}
finally
{
this.View.SetScanner(true);
}
return newMon;
}
开发者ID:tu-tran,项目名称:FareLiz,代码行数:67,代码来源:CheckFareController.cs
示例13: GetLock
public bool GetLock(IEnumerable<string> assets, OperationMode mode)
{
dataCarrier.assets = assets.ToList();
return true;
}
开发者ID:kjems,项目名称:uversioncontrol,代码行数:5,代码来源:DecoratorLoopback.cs
示例14: LoadFrom
//.........这里部分代码省略.........
DeadMessageDuration = (long)long.Parse(config.appSettings[DeadMsgkey]);
}
catch { }
try
{
DependencyInjectionEnabled = (bool)bool.Parse(config.appSettings[DepInjkey]);
}
catch { }
try
{
UddiEnabled = (bool)bool.Parse(config.appSettings[UddiEnabledKey]);
}
catch { }
try
{
DNSEnabled = (bool)bool.Parse(config.appSettings[DNSEnabledKey]);
}
catch { }
try
{
ServiceUnavailableBehavior = (UnavailableBehavior)Enum.Parse(typeof(UnavailableBehavior), config.appSettings[AgentBevKey]);
}
catch { }
try
{
DCSretrycount = Int32.Parse(config.appSettings[DCSlretrykey]);
}
catch { }
try
{
PCSretrycount = Int32.Parse(config.appSettings[PCSlretrykey]);
}
catch { }
try
{
DiscoveryInterval = Int32.Parse(config.appSettings[discoveryInterval]);
}
catch { }
try
{
UddiInquiryUrl = (config.appSettings[UddiURLKey]);
}
catch { }
try
{
UddiSecurityUrl = (config.appSettings[UddiSecUrlKey]);
}
catch { }
try
{
UddiAuthRequired = bool.Parse(config.appSettings[UddiAuthKey]);
}
catch { }
try
{
UddiUsername = (config.appSettings[UddiUsernameKey]);
}
catch { }
try
{
UddiEncryptedPassword = (config.appSettings[UddipwdKey]);
}
catch { }
try
{
UddiDCSLookup = (config.appSettings[UddiDCSkey]);
}
catch { }
try
{
UddiPCSLookup = (config.appSettings[UddiPCSkey]);
}
catch { }
try
{
_uddifindType = (UddiFindType)Enum.Parse(typeof(UddiFindType), (config.appSettings[UddiFindTypekey]));
}
catch { }
try
{
operatingmode = (OperationMode)Enum.Parse(typeof(OperationMode), (config.appSettings[operatingModeKey]));
}
catch { }
try
{
PersistLocation = (config.appSettings[PersistKey]);
}
catch { }
}
catch (Exception)
{
}
}
开发者ID:mil-oss,项目名称:fgsms,代码行数:101,代码来源:ConfigLoader.cs
示例15: operationModeToString
private static string operationModeToString(OperationMode mode)
{
if(mode == Ice.OperationMode.Normal)
{
return "::Ice::Normal";
}
if(mode == Ice.OperationMode.Nonmutating)
{
return "::Ice::Nonmutating";
}
if(mode == Ice.OperationMode.Idempotent)
{
return "::Ice::Idempotent";
}
return "???";
}
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:18,代码来源:Object.cs
示例16: SharpAESCrypt
/// <summary>
/// Constructs a new AESCrypt instance, operating on the supplied stream
/// </summary>
/// <param name="password">The password used for encryption or decryption</param>
/// <param name="stream">The stream to operate on, must be writeable for encryption, and readable for decryption</param>
/// <param name="mode">The mode of operation, either OperationMode.Encrypt or OperationMode.Decrypt</param>
public SharpAESCrypt(string password, Stream stream, OperationMode mode)
{
//Basic input checks
if (stream == null)
throw new ArgumentNullException("stream");
if (password == null)
throw new ArgumentNullException("password");
if (mode != OperationMode.Encrypt && mode != OperationMode.Decrypt)
throw new ArgumentException(Strings.InvalidOperationMode, "mode");
if (mode == OperationMode.Encrypt && !stream.CanWrite)
throw new ArgumentException(Strings.StreamMustBeWriteAble, "stream");
if (mode == OperationMode.Decrypt && !stream.CanRead)
throw new ArgumentException(Strings.StreamMustBeReadAble, "stream");
m_mode = mode;
m_stream = stream;
m_extensions = new List<KeyValuePair<string, byte[]>>();
if (mode == OperationMode.Encrypt)
{
this.Version = DefaultFileVersion;
m_helper = new SetupHelper(mode, password, null);
//Setup default extensions
if (Extension_InsertCreateByIdentifier)
m_extensions.Add(new KeyValuePair<string, byte[]>("CREATED-BY", System.Text.Encoding.UTF8.GetBytes(Extension_CreatedByIdentifier)));
if (Extension_InsertTimeStamp)
{
m_extensions.Add(new KeyValuePair<string, byte[]>("CREATED-DATE", System.Text.Encoding.UTF8.GetBytes(DateTime.Now.ToString("yyyy-MM-dd"))));
m_extensions.Add(new KeyValuePair<string, byte[]>("CREATED-TIME", System.Text.Encoding.UTF8.GetBytes(DateTime.Now.ToUniversalTime().ToString("hh-mm-ss"))));
}
if (Extension_InsertPlaceholder)
m_extensions.Add(new KeyValuePair<string, byte[]>("", new byte[127])); //Suggested extension space
//We defer creation of the cryptostream until it is needed,
// so the caller can change version, extensions, etc.
// before we write the header
m_crypto = null;
}
else
{
//Read and validate
ReadEncryptionHeader(password);
m_hmac = m_helper.GetHMAC();
//Insert the HMAC before the decryption so the HMAC is calculated for the ciphertext
m_crypto = new CryptoStream(new CryptoStream(new StreamHider(m_stream, m_version == 0 ? HASH_SIZE : (HASH_SIZE + 1)), m_hmac, CryptoStreamMode.Read), m_helper.CreateCryptoStream(m_mode), CryptoStreamMode.Read);
}
}
开发者ID:dylanmorshead,项目名称:SimpleCrypt,代码行数:59,代码来源:SharpAESCrypt.cs
示例17: GetTransportationReports
/// <summary>
/// Gets the transportation reports.
/// </summary>
/// <param name="mode">The mode.</param>
/// <param name="fromDate">From date.</param>
/// <param name="toDate">To date.</param>
/// <returns></returns>
public List<TransporationReport> GetTransportationReports(OperationMode mode, DateTime? fromDate, DateTime? toDate)
{
int ledgerId = (mode == OperationMode.Dispatch) ? Ledger.Constants.GOODS_DISPATCHED : Ledger.Constants.GOODS_ON_HAND_UNCOMMITED;
var list = _unitOfWork.TransactionRepository.Get(item =>
(item.LedgerID == ledgerId && (item.QuantityInMT > 0 || item.QuantityInUnit > 0))
&&
(item.TransactionGroup.DispatchDetails.Any() || item.TransactionGroup.ReceiveDetails.Any())
&&
(!item.TransactionGroup.InternalMovements.Any() || !item.TransactionGroup.Adjustments.Any())
);
if (fromDate.HasValue)
{
list = list.Where(p => p.TransactionDate >= fromDate.Value);
}
if (toDate.HasValue)
{
list = list.Where(p => p.TransactionDate <= toDate.Value);
}
return (from t in list
group t by new { t.Commodity, t.Program } into tgroup
select new TransporationReport()
{
Commodity = tgroup.Key.Commodity.Name,
Program = tgroup.Key.Program.Name,
NoOfTrucks = tgroup.Count(),
QuantityInMT = tgroup.Sum(p => p.QuantityInMT),
QuantityInUnit = tgroup.Sum(p => p.QuantityInUnit)
}).ToList();
}
开发者ID:FishAbe,项目名称:cats-hub-module,代码行数:38,代码来源:TransactionService.cs
示例18: GetGroupedTransportationReports
/// <summary>
/// Gets the grouped transportation reports.
/// </summary>
/// <param name="mode">The mode.</param>
/// <param name="fromDate">From date.</param>
/// <param name="toDate">To date.</param>
/// <returns></returns>
public List<GroupedTransportation> GetGroupedTransportationReports(OperationMode mode, DateTime? fromDate, DateTime? toDate)
{
var list = (from tr in GetTransportationReports(mode, fromDate, toDate)
group tr by tr.Program into trg
select new GroupedTransportation()
{
Program = trg.Key,
Transportations = trg.ToList()
});
return list.ToList(); ;
}
开发者ID:FishAbe,项目名称:cats-hub-module,代码行数:18,代码来源:TransactionService.cs
示例19: StartingOperationMessage
public static string StartingOperationMessage(OperationMode operationname)
{
return LC.L(@"The operation {0} has started", operationname);
}
开发者ID:thekrugers,项目名称:duplicati,代码行数:4,代码来源:Strings.cs
示例20: GoTo
void GoTo(OperationMode mode)
{
MethodInvoker action = new MethodInvoker(delegate()
{
CurrentOperationMode = mode;
switch (mode)
{
case OperationMode.Portal:
ArenaServerListView.Items.Clear();
RoomListView.Items.Clear();
LocationTabControl.SelectedTab = PortalTabPage;
EnableRoomEditFormItems(false);
break;
case OperationMode.ArenaLobby:
ArenaServerListView.Items.Clear();
RoomListView.Items.Clear();
LocationTabControl.SelectedTab = ArenaTabPage;
RoomCreateEditButton.Text = "部屋を作成";
RoomCreateEditButton.Enabled = true;
RoomCloseExitButton.Text = "部屋を閉じる";
RoomCloseExitButton.Enabled = false;
RoomMasterNameTextBox.Text = LoginUserName;
EnableRoomEditFormItems(true);
break;
case OperationMode.PlayRoomMaster:
LocationTabControl.SelectedTab = PlayRoomTabPage;
RoomCreateEditButton.Text = "部屋を修正";
RoomCreateEditButton.Enabled = true;
RoomCloseExitButton.Text = "部屋を閉じる";
RoomCloseExitButton.Enabled = true;
RoomMasterNameTextBox.Text = LoginUserName;
EnableRoomEditFormItems(true);
break;
case OperationMode.PlayRoomParticipant:
LocationTabControl.SelectedTab = PlayRoomTabPage;
RoomCreateEditButton.Enabled = false;
RoomCloseExitButton.Text = "退室する";
RoomCloseExitButton.Enabled = true;
EnableRoomEditFormItems(false);
break;
case OperationMode.Offline:
ArenaServerListView.Items.Clear();
RoomListView.Items.Clear();
playersTreeView.Nodes.Clear();
RoomCreateEditButton.Enabled = false;
RoomCloseExitButton.Enabled = false;
EnableRoomEditFormItems(false);
ServerLoginButton.Text = SERVER_LOGIN;
ServerLoginButton.Enabled = true;
ServerAddressComboBox.Enabled = true;
playersTreeView.Nodes.Clear();
ResetServerStatusBar();
LoginUserNameTextBox.Enabled = true;
break;
case OperationMode.ConnectingToServer:
LoginUserNameTextBox.Enabled = false;
MainTabControl.SelectedTab = chatTagPage;
break;
default:
break;
}
});
if (InvokeRequired)
Invoke(action);
else
action();
}
开发者ID:montehunter,项目名称:PSPdotNetParty,代码行数:73,代码来源:ArenaClientForm.cs
注:本文中的OperationMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论