void CheckDataType(string Name) { if (tdc.CheckName(Name)) //简单输出显示 变量的值 { CalData datatemp; try { datatemp = tdc.GetData(Name).GetCalData(); } catch (AssignedError e) { PushToShow(e.Message); return; } switch (datatemp.CalType) { case DataType.BLOCK: { BlockData bd = (BlockData)datatemp; PushToShow(bd.ToString()); } break; case DataType.EXP: { ExpData ed = (ExpData)datatemp; try { PushToShow(ed.ToString()); } catch (ExpError e) { PushToShow(e.Message); } break; } case DataType.MATRIX: { Matrix matrix = (Matrix)datatemp; PushToShow(matrix.ToString()); } break; case DataType.FUNC: { FuncData fd = (FuncData)datatemp; PushToShow(fd.ToString()); } break; } } else { var str = SimpleCal(InputData); if (str == null) { PushToShow("No result"); } else { PushToShow(str.ToString()); } } }